import http from "@/utils/http";

/**
 * 获取用户信息
 * @returns
 */
export const getUserInfo = () => http.get('/user/info')
/**
 * 登录
 * @param {*} body
 * @returns
 */
export const login = (body) => http.post('/user/login', body)

export function ulist(body) {
    return http.get('/user/users');
}
export function add(body) {
    return http.post('/user/add', body);
}
export function get(body) {
    return http.post('/user/get',JSON.stringify(body), {
        headers: {
            'Content-Type': 'application/json' // 显式设置 Content-Type 为 JSON
        }})
}
export function update(body) {
    return http.post('/user/update', body);
}
export function dd(body) {
    return http.post('/user/delete',JSON.stringify(body), {
        headers: {
            'Content-Type': 'application/json' // 显式设置 Content-Type 为 JSON
        }})
}
export function updateuser(body) {
    return http.post('/user/updateuser', body);
}
